#ifndef OPENCV_H
#define OPENCV_H

#include <QWidget>
#include <QDebug>
#include <vector>
#include <QTimer>       // 定时器类
#include <QImage>
#include <QPixmap>
#include <opencv2/opencv.hpp>   // 头文件.hpp也是C++的文件格式
#include <opencv2/highgui/highgui.hpp>
#include <QDateTime>
using namespace cv; // 名字空间

namespace Ui {
class Opencv;
}

class Opencv : public QWidget
{
    Q_OBJECT

public:
    explicit Opencv(QWidget *parent = 0);
    ~Opencv();

private:
    Ui::Opencv *ui;
    CascadeClassifier classifier;
    VideoCapture cap;
    Mat src;
    std::vector<Rect>faces;

    // 定时器对象
    QTimer *timer;
    QTimer *timer1; //时间显示定时器
private slots:
    void timeoutSlot();
    void onMonitoring();//监控的控制
    void timeoutSlot1(); //时间显示

};

#endif // OPENCV_H
